package com.agent.platform.task;

import com.agent.platform.service.AgentService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RequiredArgsConstructor
public class AgentHeartbeatTask {
    
    private final AgentService agentService;
    
    @Scheduled(fixedRate = 60000)
    public void checkOffline() {
        log.debug("执行智能体离线检测任务");
        agentService.checkOffline();
    }
}
